package com.lzx.answer.feign;

import com.lzx.answer.entity.vo.User;
import com.lzx.common.entity.Inform;
import com.lzx.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@Component
@FeignClient("five-cube-user")
public interface UserClient {
    //根据id获取用户信息
    @GetMapping("/user/user/web/toOtherServe/{id}")
    User getUserinfoByIdToOtherServe(@PathVariable Long id);

    //用户回答问题，回答数+1
    @PutMapping("/user/user/web/userReplyAdd/{userId}")
    R userReplyAdd(@PathVariable Long userId);

    //用户点赞问题，用户积分+1
    @PostMapping("/user/user/web/likeProblem/{userId}")
    R likeProblem(@PathVariable Integer userId);

    //保存通知
    @PostMapping("/user/inform/web/saveInform")
    String saveInform(@RequestBody Inform inform);
}
